package com.yanfan.ccapicode.handler.protocol.baidu;

import com.yanfan.ccapicode.bean.third.baidu.BaiduHeader;
import com.yanfan.ccapicode.handler.factory.CloudProtocolHandlerFactory;
import com.yanfan.ccapicode.handler.protocol.AbstractStrategyProtocolHandler;
import com.yanfan.ccapicode.mangaer.DeviceRelationManager;

import java.util.UUID;

/**
 * :)
 *
 */
public abstract class AbstractStrategyBaiduHandler <R,P> extends AbstractStrategyProtocolHandler<R,P> {

    protected AbstractStrategyBaiduHandler(CloudProtocolHandlerFactory factory, DeviceRelationManager deviceManager) {
        super(factory, deviceManager);
    }

    protected BaiduHeader buildHeader(String namespace, String name){
        return BaiduHeader.builder()
                .messageId(UUID.randomUUID().toString())
                .name(name)
                .namespace(namespace)
                .payloadVersion("1")
                .build();
    }
}
